const mongoose = require('mongoose');

mongoose.connect('mongodb://admin:zxf123@localhost:4396/vblog', err => {
  if (err) {
    console.log('连接失败');
    return;
  } else {
    console.log('链接成功');
  }
});

// 将mongoose导出,方便后续操作
module.exports = mongoose;
